package com.wk.config;


import com.wk.aop.WebLogAspect;
import org.springframework.context.annotation.*;

import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@EnableAspectJAutoProxy
@Configuration
@ComponentScan({"com.wk.contrller", "com.wk.intercept"})
@Import({WebConfig.class, WebLogAspect.class})
@EnableWebMvc
public class SpringMvcConfig {


    @Bean
    public ViewResolver viewResolver() {
        InternalResourceViewResolver resolver = new InternalResourceViewResolver();
        resolver.setPrefix("/WEB-INF/views/");///WEB-INF/views/login.jsp
        resolver.setSuffix(".jsp");
        resolver.setExposeContextBeansAsAttributes(true);
        return resolver;
    }
}

